package com.examination.api.administrator;

import com.examination.framework.model.response.QueryResponseResult;
import com.examination.framework.model.response.ResponseResult;
import com.examination.system.administration.Nation;
import com.examination.system.administration.response.AddAdministrationResult;
import com.examination.system.administration.response.DeleteAdministrationResult;
import io.swagger.annotations.*;

import java.util.List;

/**
 * @author 寇淇芮
 * @Date 2019/8/24 18:51
 */
@Api(value = "民族管理",description = "提供民族的增删改查功能")
public interface NationControllerApi {
    @ApiOperation( "添加民族")
    @ApiParam(required = true,name = "nation",value = "添加民族的对象")
    AddAdministrationResult addNation(Nation nation);
    @ApiOperation( "查找全部数据")
    QueryResponseResult<Nation> findNationAll();
    @ApiOperation("删除数据")
    @ApiParam(required = false,name = "id",value = "民族的id,在url地址中获取数据")
    DeleteAdministrationResult deleteNation(String id);

    @ApiOperation("更新数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",required = true,value = "民族的id,在url获取",dataType = "String",paramType ="path"),
            @ApiImplicitParam(name = "nation",required = true,paramType="body",value = "更新的民族信息",dataType = "Nation"  )
    })
    ResponseResult editNation(String id,Nation nation);

    @ApiOperation("获取全部信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page",paramType = "path",required = true,value = "查询的页码",dataType = "String"),
            @ApiImplicitParam(name = "size",dataType = "String",required = true,value = "页每页显示的条数",paramType = "path")
    })
    QueryResponseResult findNationList(Integer page,Integer size);
}
